package com.zrrd.io.conversionStream;

import java.io.FileOutputStream;
import java.io.OutputStreamWriter;

/**
 * @author WanJl
 * @version 1.0
 * @title OutputStreamWriterDemo01
 * @description 输出转换流--从字符转换到字节
 * 把字符，按照指定的字符集编码，转换成字节，输出到指定文件中。
 * @create 2023/10/14 20:03
 */
public class OutputStreamWriterDemo01 {
    public static void main(String[] args) throws Exception{
        OutputStreamWriter osw = new OutputStreamWriter(new FileOutputStream("D:/张三.txt",true), "UTF-8");
        osw.write("中软睿达");
        osw.close();
    }
}
